using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;

namespace ClientTools.Client.Controls.Packager.PackageClasses
{
    [Serializable]
    [XmlRoot("umbPackage")]
    public class UmbPackage
    {
        private Info _info = new Info();
        private CommandCollection _commands = new CommandCollection();
        private MacroCollection _macros = new MacroCollection();
        private FileCollection _files = new FileCollection();
        private TemplateCollection _templates = new TemplateCollection();
        private DocumentTypeCollection _documentTypes = new DocumentTypeCollection();
        private StylesheetCollection _stylesheets = new StylesheetCollection();
        private DocumentSetCollection _documents = new DocumentSetCollection();
        private string _control;

        [XmlElement("info")]
        public Info Info
        {
            get { return _info; }
            set { _info = value; }
        }

        [XmlArray("commands")]
        public CommandCollection Commands
        {
            get { return _commands; }
            set { _commands = value; }
        }

        [XmlArray("macros")]
        [XmlArrayItem("macro")]
        public MacroCollection Macros
        {
            get { return _macros; }
            set { _macros = value; }
        }

        [XmlArray("files")]
        [XmlArrayItem("file")]
        public FileCollection Files
        {
            get { return _files; }
            set { _files = value; }
        }

        public TemplateCollection Templates
        {
            get { return _templates; }
            set { _templates = value; }
        }

        public DocumentTypeCollection DocumentTypes
        {
            get { return _documentTypes; }
            set { _documentTypes = value; }
        }

        public StylesheetCollection Stylesheets
        {
            get { return _stylesheets; }
            set { _stylesheets = value; }
        }

        [XmlArray("Documents")]
        [XmlArrayItem("DocumentSet")]
        public DocumentSetCollection Documents
        {
            get { return _documents; }
            set { _documents = value; }
        }

        [XmlElement("control")]
        public string Control
        {
            get { return _control; }
            set { _control = value; }
        }
    }
}
